"""
区域限制类相关接口
包含物联卡区域限制状态查询、区域查询等接口方法。
"""

from .api_utils import md5, get_tkey, post_api

def card_region_limit_status_query(userName, passWord, iccid):
    """物联卡区域限制状态查询接口"""
    url = "https://api.tibiot.com/api/v1/card/regionLimitStatus"
    tKey = get_tkey()
    pw = md5(md5(passWord) + tKey)
    data = {"userName": userName, "passWord": pw, "tKey": tKey, "iccid": iccid}
    return post_api(url, data)

def card_region_limit_place_query(userName, passWord, iccid):
    """物联卡区域限制区域查询接口"""
    url = "https://api.tibiot.com/api/v1/card/simRegionLimitArea"
    tKey = get_tkey()
    pw = md5(md5(passWord) + tKey)
    data = {"userName": userName, "passWord": pw, "tKey": tKey, "iccid": iccid}
    return post_api(url, data)
